package cn.zyy.hotel.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Room {

  private Integer id;
  private String photo;
  private String roomNum;
  private Integer roomTypeId;
  private Integer floorId;
  //房间状态(1-已预订 2-已入住 3-可预订)
  private Integer status;
  private String roomDesc;
  private String roomRequirement;
  private String remark;

  //房型名称
  private String typeName;
  //楼层名称
  private String floorName;
  //状态字符串
  private String statusStr;
  //房型价格
  private Double price;
  //床位数
  private Integer bedNum;

  public String getStatusStr(){
    //判断状态是否为空
    if (status != null) {
      switch (status){
        case 1:
          statusStr = "已预订";
          break;
        case 2:
          statusStr = "已入住";
          break;
        case 3:
          statusStr = "可预订";
          break;
      }
    }
    return statusStr;
  }

}
